import requests

total = 0
headers = {
    'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36',
    'cookie':'sessionid=dbn70q9i6gw4blvxphcjodbub6dofq3y',
    'referer':'https://www.mashangpa.com/problem-detail/3/',
}
for i in range(1,21):
    url = f'https://www.mashangpa.com/api/problem-detail/3/data/?page={i}'
    response = requests.get(url,headers=headers)
    print(response.json()['current_array'])
    for item in response.json()['current_array']:
        total += item

print(total)
